﻿<Window x:Class="NetworkTreeSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:TouchControls="clr-namespace:TouchControls;assembly=TouchControls"
        xmlns:NetworkTree="clr-namespace:NetworkTree" Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <Style x:Key="MyNetworkTree"  TargetType="TouchControls:NetworkTree">
            <Setter Property="NodeContentTemplate">
                <Setter.Value>
                    <ControlTemplate TargetType="TouchControls:NetworkTreeNode">
                        <Grid>
                            <TextBlock Text="test" HorizontalAlignment="Center" />
                            <Border 
                        Background="Red"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding CornerRadius}"
                        Padding="{TemplateBinding Padding}">
                                <TouchControls:NetworkTreeExpanderButton Background="Transparent">
                                    <TouchControls:NetworkTreeExpanderButton.Template>
                                        <ControlTemplate>

                                            <StackPanel Background="Transparent">
                                                <Image Source="{Binding Icon}" HorizontalAlignment="Center" />
                                                <TextBlock Text="{Binding Label}" HorizontalAlignment="Center" />
                                                <TextBlock Text="test" HorizontalAlignment="Center" />
                                            </StackPanel>

                                        </ControlTemplate>
                                    </TouchControls:NetworkTreeExpanderButton.Template>

                                </TouchControls:NetworkTreeExpanderButton>
                            </Border>

                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid>
        <Viewbox>
            <TouchControls:NetworkTree x:Name="Tree" Style="{StaticResource MyNetworkTree}" HorizontalAlignment="Center">
                        
            </TouchControls:NetworkTree>
        </Viewbox>
    </Grid>
</Window>
